use TESTCADET08

CREATE TABLE Classe (
  CLA_Code INTEGER NOT NULL IDENTITY,
  CLA_Libelle VARCHAR(255) NULL,
  PRIMARY KEY(CLA_Code)
);

go

CREATE TABLE Activite (
  ACT_Code VARCHAR(8) NOT NULL ,
  ACT_Libelle VARCHAR(255) NULL,
  ACT_Etat bit ,
  ACT_Utilisateur VARCHAR(10) NULL,
  ACT_DateCreationModif DATETIME NULL,
  PRIMARY KEY(ACT_Code)
);
go

CREATE TABLE Auxiliaire (
  AUX_Code INTEGER NOT NULL IDENTITY,
  AUX_Libelle VARCHAR(255) NULL,
  AUX_Compte VARCHAR(8) NULL,
  PRIMARY KEY(AUX_Code)
);

go

CREATE TABLE Utilisateur (
  UTI_Code INTEGER  NOT NULL IDENTITY,
  UTI_Libelle VARCHAR(255) NULL,
  UTI_DroitsArrete bit NULL,
  UTI_DroitsSaisie bit  NULL,
  UTI_DroitsSuppression bit NULL,
  UTI_DroitsMenu bit NULL,
  PRIMARY KEY(UTI_Code)
);
go

CREATE TABLE Adresse (
  ADR_Code INTEGER  NOT NULL identity,
  ADR_Libelle VARCHAR(255) NULL,
  ADR_NumeroVoie INTEGER NULL,
ADR_ExtensionVoie INTEGER NULL,
  ADR_TypeVoie VARCHAR(10) NULL,
  ADR_NomVoie VARCHAR(45) NULL,
  ADR_Complement1 VARCHAR(255) NULL,
  ADR_Complement2 VARCHAR(255) NULL,
  ADR_CP INTEGER  NULL,
  ADR_Ville VARCHAR(20) NULL,
  ADR_Pays VARCHAR(20) NULL,
  ADR_TelephoneFixe VARCHAR(20) NULL,
  ADR_TelephoneMobile VARCHAR(20) NULL,
  ADR_Email VARCHAR(60) NULL,
ADR_WWW VARCHAR(255) NULL,
  PRIMARY KEY(ADR_Code)
);
go

CREATE TABLE _Etat (
  ETA_Code INTEGER NOT NULL identity,
  ETA_Libelle numeric(10,2) NULL,
  PRIMARY KEY(ETA_Code)
);

go

CREATE TABLE Configuration (
  CON_Code INTEGER NOT NULL,
  CON_Son VARCHAR(20) NULL,
  CON_Memo VARCHAR(20) NULL,
  CON_ImageFond VARCHAR(20) NULL,
  CON_CheminInstall VARCHAR(255) NULL,
  PRIMARY KEY(CON_Code)
);

go

CREATE TABLE Amortissement (
  AMO_Code INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  AMO_Libelle VARCHAR(255) NULL,
  PRIMARY KEY(AMO_Code)
)
;

go



CREATE TABLE Utilisateur (
  UTI_Code VARCHAR(10) NOT NULL,
  UTI_Libelle VARCHAR(255) NULL,
  UTI_DroitsArrete bit NULL,
  UTI_DroitsSaisie bit NULL,
  UTI_DroitsSuppression bit NULL,
  UTI_DroitsMenu bit NULL,
  PRIMARY KEY(UTI_Code)
);
TYPE=InnoDB;